<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-store"/>
    <meta http-equiv="Expires" content="0"/>
    <link rel="shortcut icon" type="image/x-icon" th:href="@{/static/favicon2.ico}">
    <link rel="stylesheet" th:href="@{/static/plugins/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/static/css/layout.css}">
    <link rel="stylesheet" th:href="@{/static/css/common.css}">
    <style>
        .page-content {
            padding: 10px;
        }

        #dy {
            position: fixed;
            right: 5px;
            top: 10px;
        }
    </style>
</head>
<body>
<button class="layui-btn layui-btn-sm layui-btn-normal" type="button"  id="dy">打印</button>
<div class="page-content" th:utext="${advice.content}" id="print">

</div>
<script th:src="@{/static/plugins/jquery.js}"></script>
<script th:src="@{/static/plugins/layui/layui.js}"></script>
<script th:src="@{/static/js/common.js}"></script>
<script th:src="@{/static/plugins/jquery-migrate-1.2.1.min.js}"></script>
<script th:src="@{/static/plugins/jquery.jqprint-0.3.js}"></script>
<script>
    $("#dy").on('click',function(){
        var $print = $("#print");
        $print.jqprint();
    });
</script>
</body>

</html>